﻿using System;
using GalaSoft.MvvmLight;
using ProjectWizardManagement.Entity.Model;

namespace ProjectWizardManagementv1.ViewModels.Concrete
{
    public class CalendarEventViewModel :ViewModelBase
    {
        private readonly CalendarEvent _calendarEvent;

        public string Name
        {
            get { return _calendarEvent.EventName; }
            set { _calendarEvent.EventName = value; RaisePropertyChanged("Name"); }
        }

        public string Description
        {
            get { return _calendarEvent.Description; }
            set { _calendarEvent.Description = value; RaisePropertyChanged("Description"); }
        }

        public bool IsSendingNotification
        {
            get { return _calendarEvent.IsSendingNotification; }
            set { _calendarEvent.IsSendingNotification = value; RaisePropertyChanged("IsSendingNotification"); }
        }

        public DateTime ScheduledDate
        {
            get { return _calendarEvent.ScheduledDate; }
            set { _calendarEvent.ScheduledDate = value; RaisePropertyChanged("ScheduledDate"); }
        }

        public CalendarEvent CalendarEvent
        {
            get { return _calendarEvent; }
        }

        public bool IsSelected { get; set; }

        public bool IsRepresentedDateSelected { get; set; }

        public CalendarEventViewModel(CalendarEvent calEvent)
        {
            _calendarEvent = calEvent;
        }

        public override string ToString()
        {
            return Name;
        }
    }
}
